package com.liuyongyi.livepush.camerapush.natives;

/**
 * 调用c代码进行推流
 * Created by liuyongyi on 2018/1/1.
 */

public class PusherNative {

    public native void startPusher(String url);

    public native void stopPusher();

    public native void release();

    /**
     *设置视频参数
     * @param width 视频宽
     * @param height 视频高
     * @param bitrate 比特率
     * @param fps fps
     *
     */
    public native void setVideoOptions(int width,int height, int bitrate,int fps);

    /**
     * 设置音频参数
     * @param simpleRateInHz
     * @param channel 声道数
     */
    public native void setAudioOptions(int simpleRateInHz,int channel);

    //发送视频
    public native void sendVideo(byte[] data);
    //发送音频
    public native void sendAudio(byte[] data,int leng);
}
